package com.tentcoo.core.event.demo;

import com.tentcoo.core.event.EventListener;

public class EventListenerDemo extends EventListener<EventDemo> {

	@Override
	public void action(EventDemo event) {
		Object eventSource = event.getEventSource();
		if (eventSource instanceof EventRaiserDemo) {
			EventRaiserDemo eventRaiserDemo = (EventRaiserDemo) eventSource;
			int n = eventRaiserDemo.getN();
			n++;
			eventRaiserDemo.setN(n);
		}

	}

}
